﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebSite.Models.BudgetCombinationModel>" %>
<%@ Import Namespace="WebSite.Models" %>
<%@ Import Namespace="WebSite.App_Code" %>
<%@ Import Namespace="WebSite.App_Data" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	BudgetCombination
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	
	<script type="text/javascript">

		function SelectBStatus(sender) {

			if ($(sender).attr("checked")) {
				$("#budget_status_list > option[value=" + $(sender).attr("val") + "]").attr("selected", "selected");
			}
			else
				$("#budget_status_list > option[value=" + $(sender).attr("val") + "]").removeAttr("selected");
		}
		
	</script>

	<% Html.BeginForm(); %>

    <table>        
    <tr>
		<td>年度</td>
		<td><%=Html.DropDownListFor(model => model.Q_Year, Model.DS_Year)%></td>
        <td>金额单位</td>
        <td><%=Html.DropDownListFor(model => model.Q_Currency, Model.DS_Currency)%></td>
		<td colspan="2"></td>
	</tr>
	<tr>
        <td>类别</td>
        <td><%=Html.DropDownListFor(model=>model.Q_Category, Model.DS_Category)%></td>
        <td>类型</td>
        <td><%=Html.DropDownListFor(model=>model.Q_Type, Model.DS_Type)%></td>
		<td colspan="2"></td>
    </tr>
	<tr>
        <td>状态</td>
        <td colspan="4">
			<% foreach (SelectListItem bs in Model.DS_Status) { %>
				<%=bs.Text %><input type="checkbox" onclick="SelectBStatus(this)" 
					val="<%=bs.Value %>"
				<% if(Model.Q_BStatus.Contains(bs.Value)){ %>checked<% } %> />
			<% } %>
		</td>
    </tr>
	<tr style="display:none">
		<td colspan="5">
			<%=Html.ListBoxFor(model => model.Q_BStatus, Model.DS_Status, new { id="budget_status_list" })%>
		</td>
	</tr>
    <tr>
        <td>编制单位</td>
        <td colspan="3"><%=Html.TextBoxFor(model => model.Q_Department, new { @class = "budget-txt-no-01" })%></td>
        <td>项目负责人</td>
        <td><%=Html.TextBoxFor(model => model.Q_PIC, new { @class = "budget-txt-no-01" })%></td>
    </tr>
    <tr>
        <td>项目名称</td>
        <td colspan="3"><%=Html.TextBoxFor(model => model.Q_PjName, new { @class = "budget-txt-no-01" })%></td>
        <td>项目代号</td>
        <td><%=Html.TextBoxFor(model => model.Q_PjCode, new { @class = "budget-txt-no-01" })%></td>
    </tr>
	</table>

	<input type="submit" value="导出"/>

	<% Html.EndForm(); %>

</asp:Content>
